package com.example.shiro01.control;

import com.example.shiro01.service.imp.UserServiceImp;
import com.example.shiro01.util.jiam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
public class UserControl {

    @Autowired
    private UserServiceImp userServiceImp;


    private jiam jv;

    @RequestMapping("zhuce")
    public String addUser(String name,String pwd){
        String jiapwd =jv.MD5Pwd(name,pwd);
        String str="";
        if (userServiceImp.addUser(name ,jiapwd)>0){
            str="login";
        }
        return str;
    }
}
